home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Apple WWDC 1996
/
WWDC96_1996 (CD).toast
/
Technology Materials
/
MacOS 8 Resources
/
Developer Tools
/
Mac OS 8 Interfaces & Libraries
/
Interfaces
/
IDLIncludes
/
TextEdit.idl
< prev
next >
Wrap
Text File
|
1996-05-01
|
10KB
|
316 lines
/*
File: TextEdit.idl
Contains: TextEdit Interfaces.
Version: Technology: System 7.5
Release: Universal Interfaces 3.0d3 on Copland DR1
Copyright: © 1984-1996 by Apple Computer, Inc. All rights reserved.
Bugs?: If you find a problem with this file, send the file and version
information (from above) and the problem description to:
Internet: apple.bugs@applelink.apple.com
AppleLink: APPLE.BUGS
*/
#ifndef __TEXTEDIT_IDL__
#define __TEXTEDIT_IDL__
#include <somobj.idl>
#include <somcls.idl>
#ifndef __TYPES_IDL__
#include <Types.idl>
#endif
#ifndef __QUICKDRAW_IDL__
#include <Quickdraw.idl>
#endif
#ifndef __MIXEDMODE_IDL__
#include <MixedMode.idl>
#endif
#ifndef __TEXTOBJECTS_IDL__
#include <TextObjects.idl>
#endif
#ifndef __TEXTSERVICES_IDL__
#include <TextServices.idl>
#endif
#ifdef __SOMIDL__
#if FOR_SYSTEM7_AND_SYSTEM8_COOPERATIVE
typedef OpaquePtr TEPtr; /* Substituted OpaquePtr for ``TERec*'' */
typedef OpaquePtr TEHandle; /* Substituted OpaquePtr for ``TEPtr*'' */
typedef OpaquePtr HighHookProcPtr;
typedef OpaquePtr HighHookUPP;
typedef OpaquePtr EOLHookProcPtr;
typedef OpaquePtr EOLHookUPP;
typedef OpaquePtr CaretHookProcPtr;
typedef OpaquePtr CaretHookUPP;
typedef OpaquePtr WidthHookProcPtr;
typedef OpaquePtr WidthHookUPP;
typedef OpaquePtr TextWidthHookProcPtr;
typedef OpaquePtr TextWidthHookUPP;
typedef OpaquePtr NWidthHookProcPtr;
typedef OpaquePtr NWidthHookUPP;
typedef OpaquePtr DrawHookProcPtr;
typedef OpaquePtr DrawHookUPP;
typedef OpaquePtr HitTestHookProcPtr;
typedef OpaquePtr HitTestHookUPP;
typedef OpaquePtr TEFindWordProcPtr;
typedef OpaquePtr TEFindWordUPP;
typedef OpaquePtr TERecalcProcPtr;
typedef OpaquePtr TERecalcUPP;
typedef OpaquePtr TEDoTextProcPtr;
typedef OpaquePtr TEDoTextUPP;
typedef OpaquePtr TEClickLoopProcPtr;
typedef OpaquePtr TEClickLoopUPP;
typedef OpaquePtr WordBreakProcPtr;
typedef OpaquePtr WordBreakUPP;
/*
Important note about TEClickLoopProcPtr and WordBreakProcPtr
At one point these were defined as returning the function result in the
condition code Z-bit. This was correct, in that it was what the 68K
implementation of TextEdit actually tested. But, MixedMode had a different
idea of what returning a boolean in the Z-bit meant. MixedMode was setting
the Z-bit the complement of what was wanted.
Therefore, these ProcPtrs have been changed (back) to return the result in
register D0. It turns out that for register based routines,
MixedMode sets the Z-bit of the 68K emulator based on the contents
of the return result register. Thus we can get the Z-bit set correctly.
But, when TextEdit is recoded in PowerPC, if it calls a 68K ClickLoop
or WordBreak routine, register D0 had better have the result (in addition
to the Z-bit). Therefore all 68K apps should make sure their ClickLoop or
WordBreak routines set register D0 at the end.
*/
/*
There is no function to get/set the low-mem for FindWordHook at 0x07F8.
This is because it is not a low-mem ProcPtr. That address is the entry
in the OS TrapTable for trap 0xA0FE. You can use Get/SetTrapAddress to
acccess it.
*/
/*
The following ProcPtrs cannot be written in or called from a high-level
language without the help of mixed mode or assembly glue because they
use the following parameter-passing conventions:
typedef pascal void (*HighHookProcPtr)(const Rect *r, TEPtr pTE);
typedef pascal void (*CaretHookProcPtr)(const Rect *r, TEPtr pTE);
In:
=> r on stack
=> pTE A3.L
Out:
none
typedef pascal Boolean (*EOLHookProcPtr)(char theChar, TEPtr pTE, TEHandle hTE);
In:
=> theChar D0.B
=> pTE A3.L
=> hTE A4.L
Out:
<= Boolean Z bit of the CCR
typedef pascal unsigned short (*WidthHookProcPtr)(unsigned short textLen,
unsigned short textOffset, void *textBufferPtr, TEPtr pTE, TEHandle hTE);
typedef pascal unsigned short (*TextWidthHookProcPtr)(unsigned short textLen,
unsigned short textOffset, void *textBufferPtr, TEPtr pTE, TEHandle hTE);
In:
=> textLen D0.W
=> textOffset D1.W
=> textBufferPtr A0.L
=> pTE A3.L
=> hTE A4.L
Out:
<= unsigned short D1.W
typedef pascal unsigned short (*NWidthHookProcPtr)(unsigned short styleRunLen,
unsigned short styleRunOffset, short slop, short direction, void *textBufferPtr,
short *lineStart, TEPtr pTE, TEHandle hTE);
In:
=> styleRunLen D0.W
=> styleRunOffset D1.W
=> slop D2.W (low)
=> direction D2.W (high)
=> textBufferPtr A0.L
=> lineStart A2.L
=> pTE A3.L
=> hTE A4.L
Out:
<= unsigned short D1.W
typedef pascal void (*DrawHookProcPtr)(unsigned short textOffset, unsigned short drawLen,
void *textBufferPtr, TEPtr pTE, TEHandle hTE);
In:
=> textOffset D0.W
=> drawLen D1.W
=> textBufferPtr A0.L
=> pTE A3.L
=> hTE A4.L
Out:
none
typedef pascal Boolean (*HitTestHookProcPtr)(unsigned short styleRunLen,
unsigned short styleRunOffset, unsigned short slop, void *textBufferPtr,
TEPtr pTE, TEHandle hTE, unsigned short *pixelWidth, unsigned short *charOffset,
Boolean *pixelInChar);
In:
=> styleRunLen D0.W
=> styleRunOffset D1.W
=> slop D2.W
=> textBufferPtr A0.L
=> pTE A3.L
=> hTE A4.L
Out:
<= pixelWidth D0.W (low)
<= Boolean D0.W (high)
<= charOffset D1.W
<= pixelInChar D2.W
typedef pascal void (*TEFindWordProcPtr)(unsigned short currentPos, short caller,
TEPtr pTE, TEHandle hTE, unsigned short *wordStart, unsigned short *wordEnd);
In:
=> currentPos D0.W
=> caller D2.W
=> pTE A3.L
=> hTE A4.L
Out:
<= wordStart D0.W
<= wordEnd D1.W
typedef pascal void (*TERecalcProcPtr)(TEPtr pTE, unsigned short changeLength,
unsigned short *lineStart, unsigned short *firstChar, unsigned short *lastChar);
In:
=> pTE A3.L
=> changeLength D7.W
Out:
<= lineStart D2.W
<= firstChar D3.W
<= lastChar D4.W
typedef pascal void (*TEDoTextProcPtr)(TEPtr pTE, unsigned short firstChar, unsigned short lastChar,
short selector, GrafPtr *currentGrafPort, short *charPosition);
In:
=> pTE A3.L
=> firstChar D3.W
=> lastChar D4.W
=> selector D7.W
Out:
<= currentGrafPort A0.L
<= charPosition D0.W
*/
typedef SOMLargeStruct TERec; /* Derived from a struct of 32098 bytes in size */
typedef OpaquePtr Chars; /* Substituted OpaquePtr for array of char of size 32001 */
typedef OpaquePtr CharsPtr; /* Substituted OpaquePtr for ``char*'' */
typedef OpaquePtr CharsHandle; /* Substituted OpaquePtr for ``CharsPtr*'' */
typedef SOMFourByteStruct StyleRun; /* Derived from a struct of 4 bytes in size */
typedef SOMLargeStruct STElement; /* Derived from a struct of 18 bytes in size */
typedef OpaquePtr TEStyleTable; /* Substituted OpaquePtr for array of STElement of size 1777 */
typedef OpaquePtr STPtr; /* Substituted OpaquePtr for ``STElement*'' */
typedef OpaquePtr STHandle; /* Substituted OpaquePtr for ``STPtr*'' */
typedef SOMFourByteStruct LHElement; /* Derived from a struct of 4 bytes in size */
typedef OpaquePtr LHTable; /* Substituted OpaquePtr for array of LHElement of size 8001 */
typedef OpaquePtr LHPtr; /* Substituted OpaquePtr for ``LHElement*'' */
typedef OpaquePtr LHHandle; /* Substituted OpaquePtr for ``LHPtr*'' */
typedef SOMLargeStruct ScrpSTElement; /* Derived from a struct of 20 bytes in size */
/* ARRAY [0..1600] OF ScrpSTElement */
typedef OpaquePtr ScrpSTTable; /* Substituted OpaquePtr for array of ScrpSTElement of size 1601 */
typedef SOMLargeStruct StScrpRec; /* Derived from a struct of 32022 bytes in size */
typedef OpaquePtr StScrpPtr; /* Substituted OpaquePtr for ``StScrpRec*'' */
typedef OpaquePtr StScrpHandle; /* Substituted OpaquePtr for ``StScrpPtr*'' */
typedef SOMLargeStruct NullStRec; /* Derived from a struct of 8 bytes in size */
typedef OpaquePtr NullStPtr; /* Substituted OpaquePtr for ``NullStRec*'' */
typedef OpaquePtr NullStHandle; /* Substituted OpaquePtr for ``NullStPtr*'' */
typedef SOMLargeStruct TEStyleRec; /* Derived from a struct of 32024 bytes in size */
typedef OpaquePtr TEStylePtr; /* Substituted OpaquePtr for ``TEStyleRec*'' */
typedef OpaquePtr TEStyleHandle; /* Substituted OpaquePtr for ``TEStylePtr*'' */
typedef SOMLargeStruct TextStyle; /* Derived from a struct of 12 bytes in size */
typedef OpaquePtr TextStylePtr; /* Substituted OpaquePtr for ``TextStyle*'' */
typedef OpaquePtr TextStyleHandle; /* Substituted OpaquePtr for ``TextStylePtr*'' */
typedef short TEIntHook;
#endif
#if FOR_SYSTEM8_COOPERATIVE
typedef OpaquePtr TEPreUpdateProcPtr;
typedef OpaquePtr TEPreUpdateUPP;
typedef OpaquePtr TEPostUpdateProcPtr;
typedef OpaquePtr TEPostUpdateUPP;
#endif
#if FOR_SYSTEM7_ONLY
#endif
#if OLDROUTINENAMES
#if FOR_SYSTEM7_AND_SYSTEM8_DEPRECATED
/* action for the old C "bit (un)set" interface, TEFeatureFlag */
#endif
#endif
#if FOR_SYSTEM7_AND_SYSTEM8_COOPERATIVE
#if GENERATINGCFM
#else
#endif
#endif
#if FOR_SYSTEM8_COOPERATIVE
/*
TEHandleModernAE is mostly for use by SWM to allow TSM to manage the TextEdit region
to be handled by TextEdit.
*/
#if FOR_PTR_BASED_AE
#endif
#endif
#if FOR_SYSTEM7_AND_SYSTEM8_COOPERATIVE
#if CGLUESUPPORTED
#endif
#endif
#if OLDROUTINENAMES
#if FOR_SYSTEM7_AND_SYSTEM8_DEPRECATED
#endif
#endif
#endif /* __SOMIDL__ */
#endif /* __TEXTEDIT_IDL__ */